package com.yourvote.action;

import com.yourvote.dao.DistrictDao;
import com.yourvote.dao.RegionDao;
import com.yourvote.dao.impl.DistrictDaoImpl;
import com.yourvote.dao.impl.RegionDaoImpl;
import com.yourvote.model.District;
import com.yourvote.model.Region;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: pavlo.fedyna
 * Date: 10/25/12
 * Time: 3:01 PM
 * To change this template use File | Settings | File Templates.
 */
public class CircuitAction extends BaseAction {
    DistrictDao districtDao = new DistrictDaoImpl();


    RegionDao regionDao = new RegionDaoImpl();
    private List<District> districtList = new ArrayList<District>();
    private District district;
    private String districtName;
    private String circuitNumber;
    private String circuitAddress;
    private List<Region> regions = new ArrayList<Region>();
    private String circuitRegion;
    
    public String execute(){
        districtList = districtDao.getAll();
        regions = regionDao.getAll();
        return SUCCESS;
    }
    
    public String addCircuit(){
        districtList = districtDao.getAll();
        
        return SUCCESS;
    }

    public String getCircuitNumber() {
        return circuitNumber;
    }

    public void setCircuitNumber(String circuitNumber) {
        this.circuitNumber = circuitNumber;
    }

    public String getCircuitAddress() {
        return circuitAddress;
    }

    public void setCircuitAddress(String circuitAddress) {
        this.circuitAddress = circuitAddress;
    }

    public String getDistrictName() {
        return districtName;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    public District getDistrict() {
        return district;
    }

    public void setDistrict(District district) {
        this.district = district;
    }

    public List<District> getDistrictList() {
        return districtList;
    }

    public void setDistrictList(List<District> districtList) {
        this.districtList = districtList;
    }

    public DistrictDao getDistrictDao() {
        return districtDao;
    }

    public void setDistrictDao(DistrictDao districtDao) {
        this.districtDao = districtDao;
    }

    public List<Region> getRegions() {
        return regions;
    }

    public void setRegions(List<Region> regions) {
        this.regions = regions;
    }

    public String getCircuitRegion() {
        return circuitRegion;
    }

    public void setCircuitRegion(String circuitRegion) {
        this.circuitRegion = circuitRegion;
    }

    public RegionDao getRegionDao() {
        return regionDao;
    }

    public void setRegionDao(RegionDao regionDao) {
        this.regionDao = regionDao;
    }

}
